<?php
/**
 * Setting.php
 *
 * @copyright   2023 thingsworld.com.cn - All Rights Reserved
 * @link        http://thingsworld.com.cn/
 * @author      stiffer.chen <chenl@thingsworld.com.cn>
 * @created     2023-08-22 15:46:08
 * @modified    2023-08-22 15:46:08
 *
 */

namespace App\Models;

class Setting extends BaseModel
{
    protected $table = 'setting';
    protected $primaryKey = 'id';

    protected $fillable = [
        'key',
        'value',
        'serialized'
    ];

    public function scopeByKey($query, $key)
    {
        return $query->where('key', $key);
    }
}